package com.example.myapplication.activity;
import android.os.Bundle;

import com.example.myapplication.R;
import com.example.myapplication.bases.BaseActivity;

/**
 *  * SaveStateActivity 是用于保存和恢复Activity状态的示例类。
 *  * 该类演示了如何在Activity生命周期中保存和恢复状态信息，
 *  * 以确保在配置更改（如屏幕旋转）时用户数据不会丢失。
 */


public class SaveStateActivity extends BaseActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_savestate);

    }
    @Override
    protected void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        outState.putString("name", "SaveStateActivity");
    }

}
